-- GENERATED SPELL FOR [Rotfang] --


function spell0_16050(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(15503,pUnit)
pUnit:RegisterEvent('Sorts_16050', 546, 1)
end

function spell1_16050(pUnit, Event) --@Eviscerate,n/a--
pUnit:FullCastSpellOnTarget(27611,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16050', 617, 1)
end

function spell2_16050(pUnit, Event) --@Gouge,n/a--
pUnit:FullCastSpellOnTarget(12540,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16050', 4342, 1)
end

function spell3_16050(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(27613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16050', 4269, 1)
end

function spell4_16050(pUnit, Event) --@Kidney Shot,n/a--
pUnit:FullCastSpellOnTarget(27615,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16050', 4000, 1)
end

function spell5_16050(pUnit, Event) --@Sinister Strike,n/a--
pUnit:FullCastSpellOnTarget(14873,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16050', 571, 1)
end

function spell6_16050(pUnit, Event) --@Vanish,Self--
pUnit:FullCastSpellOnTarget(27617,pUnit)
pUnit:RegisterEvent('Sorts_16050', 626, 1)
end

function Sorts_16050(pUnit, Event)
local choix_sorts_16050 = math.random(0, 6)
if choix_sorts_16050 == 0 then
pUnit:RegisterEvent('spell0_16050', 1, 1)
end
if choix_sorts_16050 == 1 then
pUnit:RegisterEvent('spell1_16050', 1, 1)
end
if choix_sorts_16050 == 2 then
pUnit:RegisterEvent('spell2_16050', 1, 1)
end
if choix_sorts_16050 == 3 then
pUnit:RegisterEvent('spell3_16050', 1, 1)
end
if choix_sorts_16050 == 4 then
pUnit:RegisterEvent('spell4_16050', 1, 1)
end
if choix_sorts_16050 == 5 then
pUnit:RegisterEvent('spell5_16050', 1, 1)
end
if choix_sorts_16050 == 6 then
pUnit:RegisterEvent('spell6_16050', 1, 1)
end
end

function mob16050_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16050', math.random(1500, 3000), 1)
end

function mob16050_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16050_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16050_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16050, 1, 'mob16050_Action')
RegisterUnitEvent(16050, 2, 'mob16050_Leave')
RegisterUnitEvent(16050, 3, 'mob16050_Kill')
RegisterUnitEvent(16050, 4, 'mob16050_Die')
